#ifndef TOUCHMAKE__
#define TOUCHMAKE__
#include <iostream>
#include <zconf.h>
#include <sys/errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <string>
#include <fcntl.h>
#include <vector>
#include <dirent.h>
#include <limits.h>
#include "SearchFile.h"
using namespace std;


#ifdef	PATH_MAX
static long	pathmax = PATH_MAX;
#else
static long	pathmax = 0;
#endif

static long	posix_version = 0;
static long	xsi_version = 0;

/* If PATH_MAX is indeterminate, no guarantee this is adequate */
#define	PATH_MAX_GUESS	1024
#define RWRWRW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH |S_IWOTH)
class TouchMake{
private:
    vector<string> fileList;
    char *path_alloc(size_t *sizep);
    char *changeSheelPath();
    void changeDir();
    void createFile();
    string fileName;
    int mFd;
    char* dirName;
    void searchFile();
    void writeFile();
public:
     TouchMake(string file);
     void start();
};
#endif